Create Chat (Async)
Creates a new chat with a user message and processes it in the background. Returns immediately with the chat ID and a "queued" status. Poll the apiUrl to check for completion.
Usage
import { v0 } from 'v0-sdk'const result = await v0.chats.createAsync({ message: 'Hello, world!', type: 'prompt',})console.log(result)API Signature
Request
Request Body
The prompt or instruction to send to the model.
System-level context for the chat, such as frameworks or development environment details.
Overrides for the model behavior.
Model to use for the generation.
Enables image generations to generate up to 5 images per version.
Files or assets to include with the message.
URL of the attachment.
MCP server IDs to enable. When omitted, uses default enabled servers.
Skill IDs (from skills.sh) to attach. Skills provide domain-specific knowledge to the AI. Maximum 3.
Initialize the chat by sending a prompt to the model.
Visibility setting for the new chat.
Title for the new chat.
Arbitrary key-value data to attach to the chat.
Response
Unique chat identifier.
ID of the assistant message that will receive the response. Poll this message by ID and check its finishReason field to detect completion.
Object type identifier.
The chat is being processed in the background. Poll for the chat to check for completion.
Create Chat
Creates a new chat from a prompt, zip archive, or GitHub repository. Prompt chats block until the model response is complete and return the chat.
Create Chat (Streaming)
Creates a new chat with a user message and returns a Server-Sent Events stream. Events include initial chat state, title deltas, content chunk deltas, and final chat state. The response is `text/event-stream`; each event is `data: <JSON>\n\n` where the JSON conforms to ChatStreamEvent.